package com.hqyj.controller;

import com.hqyj.pojo.Specifications;
import com.hqyj.service.SpecificationsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @ClassName SpecificationsController
 * @Description TODO
 * @Author ZhuYouWan
 * @Date 2022/9/2 11:15
 * @Version 1.0
 **/
@Controller
@RequestMapping("/spec")
public class SpecificationsController {
    @Autowired
    private SpecificationsService specificationsService;
    @RequestMapping("/findAllGSpecifications")
    @ResponseBody
    public Map<String,Object> findAllGSpecifications(int pageNum, int pageSize, String condition){
        return specificationsService.findAllGSpecifications(pageNum, pageSize, condition);
    }
    @RequestMapping("/deleteGSpecificationsById")
    @ResponseBody
    public Map<String, Object> deleteGSpecificationsById(int sId){
        return specificationsService.deleteGSpecificationsById(sId);
    }
    @RequestMapping("/insertGSpecifications")
    @ResponseBody
    public Map<String, Object> insertGSpecifications(Specifications specifications){
        return specificationsService.insertGSpecifications(specifications);
    }
    @RequestMapping("/findGSpecificationsById")
    @ResponseBody
    public Map<String, Object> findGSpecificationsById(int sId){
        return specificationsService.findGSpecificationsById(sId);
    }
    @RequestMapping("findGSpecificationsBysNorms")
    @ResponseBody
    public Map<String, Object> findGSpecificationsBysNorms(String sNorms){
        return specificationsService.findGSpecificationsBysNorms(sNorms);
    }
    @RequestMapping("/updateGSpecificationsById")
    @ResponseBody
    public Map<String, Object> updateGSpecificationsById(Specifications specifications){
        return specificationsService.updateGSpecificationsById(specifications);
    }
    @RequestMapping("/findSpecificationsBysNum")
    @ResponseBody
    public Map<String, Object> findSpecificationsBysNum(String sNum){
        return specificationsService.findSpecificationsBysNum(sNum);
    }
    @RequestMapping("/findSpecificationsBysNorms")
    @ResponseBody
    public Map<String,Object> findSpecificationsBysNorms(String sNorms){
        return specificationsService.findSpecificationsBysNorms(sNorms);
    }
}
